//
//  KADevInfo.swift
//  kano
//
//  Created by Frank on 2024/10/8.
//

import KakaJSON

class KADevInfo: KABaseInfo {
    var mid: String = "DEV01"
    var freespace: String = UIDevice.ka_Freespace()
    var brand: String = "apple"
    var idfa: String = UIDevice.ka_Idfa()
    var idfv: String =  UIDevice.ka_Idfv()
    var imei: String = ""
    var imsi: String = ""
    var isPad: String = UIDevice.isIpad()
    var isSimulator: String = UIDevice.isSimulator() ? "1" : "0"
    var is_vpn_used: String = UIDevice.isOpenVPN() ? "1" : "0"
    var is_wifi_proxy: String = UIDevice.kaProxyStatus() ? "1" : "0"
    var isCharging: String = UIDevice.ka_isCharging()
    var isRooted: String = KADeviceTool.isJailbroken()
    var ipV4: String = KADeviceTool.ka_iPv4Address()
    var ipV6: String = KADeviceTool.ka_iPv6Address()
    var ipv4: String = KADeviceTool.ka_iPv4Address()
    var ipv6: String = KADeviceTool.ka_iPv6Address()
    var locale: String = Locale.preferredLanguages.first ?? ""
    var memInfo: String = "\(Int64(ProcessInfo.processInfo.physicalMemory))"
    var model: String = UIDevice.ka_platform()
    var modelName: String = UIDevice.phoneModel()
    var nativePhoneNum: String = UIDevice.ka_devicePhoneNum()
    var networkType: String = UIDevice.ka_networkType()
    var providersName: String = UIDevice.ka_carrierName()
    var ram: String = KADeviceTool.ka_ramInfo()
    var screenSize: String = UIDevice.screenInches()
    var sysVersion: String = UIDevice.current.systemVersion
    var timeZone: String = TimeZone.current.identifier
    var wifimac: String = ""
    
    var totalspace: String = UIDevice.totalDiskSpace()
    var BatteryPercent: String = UIDevice.ka_batteryInfo()
    var cpuInfo: String = KADeviceTool.ka_cpuNumber()

    
    required init() {
        super.init()
    }
}
